<template>
    <view class='page'>
        <u-modal :show="show" showCancelButton :content="content" @confirm="confirm" @cancel="cancel"></u-modal>
    </view>
</template>

<script>
import { mapState, mapMutations } from 'vuex';
export default {
    components: {},
    computed: {
        ...mapState({
            isToLogin: state => state.user.isToLogin,
            tel: state => state.user.tel
        }),
        show: {
            get() { return this.isToLogin },
            set(val) { }
        }
    },
    data() {
        return {
            // show: true,
            content: "是否要前往登录页?",
        };
    },
    onLoad(options) {

    },
    methods: {
        ...mapMutations(['SET_ISToLOGIN']),
        confirm() {
            this.cancel()
            // #ifdef MP
            uni.navigateTo({
                url: '/pagesB/login/index'
            })
            // #endif
        },
        cancel() {
            this.SET_ISToLOGIN(false)
        }
    },
};
</script>
<style scoped lang='scss'>
</style>